﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Controls.Data.Input;
using System.ComponentModel.DataAnnotations;

namespace GranitePackageSystem.Models
{
    public class packageInfo
    {

        private string _packageName;
        private string _packagePublisher;
        private string _packageVersion;
        private string _packageSourceFiles;
        private string _packageSourceFilesHash;
        private string _packageSize;
        private string _packageUninstallString;
        private string _packageComments;

        [Required(ErrorMessage = "Package Name Required")]
        public string PackageName
        {
            get { return _packageName; }
            set
            {
                Validator.ValidateProperty(value, new ValidationContext(this, null, null) { MemberName = "PackageName" });
                _packageName = value;
            }
        }
        [Required(ErrorMessage = "Package Publisher Required")]
        public string PackagePublisher
        {
            get { return _packagePublisher; }
            set
            {
                Validator.ValidateProperty(value, new ValidationContext(this, null, null) { MemberName = "PackagePublisher" });
                _packagePublisher = value;
            }
        }
        [Required(ErrorMessage = "Package Version Required")]
        public string PackageVersion
        {
            get { return _packageVersion; }
            set
            {
                Validator.ValidateProperty(value, new ValidationContext(this, null, null) { MemberName = "PackageVersion" });
                _packageVersion = value;
            }
        }
        public string PackageSourceFiles
        {
            get { return _packageSourceFiles; }
            set { _packageSourceFiles = value; }
        }
        public string PackageSourceFilesHash
        {
            get { return _packageSourceFilesHash; }
            set { _packageSourceFilesHash = value; }
        }
        public string PackageSize
        {
            get { return _packageSize; }
            set { _packageSize = value; }
        }
        public string PackageUninstallString
        {
            get { return _packageUninstallString; }
            set { _packageUninstallString = value; }
        }
        public string PackageComments
        {
            get { return _packageComments; }
            set { _packageComments = value; }
        }
    }

}
